import {
	createStore
} from 'vuex'

const store = createStore({
	state: { //存放状态
		"phoneOS": '',
		'hostName':'app',
		"username": "张三",
		"pwd":"123456",
		"age": 18,
	},
	mutations: {
		getPhoneOS(state,value) {
			state.phoneOS = value
		},
		// 是否是h5运行
		getHostName(state,value) {
			state.hostName = value
		},
		getDeviceInfo() {
			uni.getSystemInfo({
				success: (res) => {
					console.log(res)
					console.log(res.appName)
				}
			});

		}


	}
})

export default store;
